<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gdsl: Low-level binary search tree manipulation module</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">gdsl
   &#160;<span id="projectnumber">1.7</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group____gdsl__bstree.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Low-level binary search tree manipulation module</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group____gdsl__bintree.html#ga797c557a551a057c0763387ce7b92fbe">_gdsl_bintree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL low-level binary search tree type.  <a href="#ga0b897530b6c7e499f38de973f8e0889d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga2716161e9382a6efb5ea83986ed5a719">_gdsl_bstree_map_func_t</a> )(<a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> TREE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL low-level binary search tree map function type.  <a href="#ga2716161e9382a6efb5ea83986ed5a719"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga770d4d27896b2c17467c243d3485a362">_gdsl_bstree_write_func_t</a> )(<a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> TREE, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL low-level binary search tree write function type.  <a href="#ga770d4d27896b2c17467c243d3485a362"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga10c784a6ed1d430af98b0adba1bebdcf">_gdsl_bstree_alloc</a> (const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> E)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new low-level binary search tree.  <a href="#ga10c784a6ed1d430af98b0adba1bebdcf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gafd25488c416a9633f4120ad314212333">_gdsl_bstree_free</a> (<a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053">gdsl_free_func_t</a> FREE_F)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a low-level binary search tree.  <a href="#gafd25488c416a9633f4120ad314212333"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga2f94dab341cc2a1c9c2a8239369dae4d">_gdsl_bstree_copy</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group__gdsl__types.html#ga4f82a1f397e66d35523569063d570175">gdsl_copy_func_t</a> COPY_F)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy a low-level binary search tree.  <a href="#ga2f94dab341cc2a1c9c2a8239369dae4d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#gaf6a258d8f3ee5206d682d799316314b1">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga5955df8215a1223beed9edb24094fd80">_gdsl_bstree_is_empty</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a low-level binary search tree is empty.  <a href="#ga5955df8215a1223beed9edb24094fd80"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#gaf6a258d8f3ee5206d682d799316314b1">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga59ae4fa970ad43f4678e58b362628db2">_gdsl_bstree_is_leaf</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a low-level binary search tree is reduced to a leaf.  <a href="#ga59ae4fa970ad43f4678e58b362628db2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gaa85b6f4474e138752d7bb1d19d444110">_gdsl_bstree_get_content</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the root content of a low-level binary search tree.  <a href="#gaa85b6f4474e138752d7bb1d19d444110"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#gaf6a258d8f3ee5206d682d799316314b1">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gae62897ba93764533e8df2495453c4fa9">_gdsl_bstree_is_root</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a low-level binary search tree is a root.  <a href="#gae62897ba93764533e8df2495453c4fa9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga786c44e574347710f4d527a2b19cf0df">_gdsl_bstree_get_parent</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the parent tree of a low-level binary search tree.  <a href="#ga786c44e574347710f4d527a2b19cf0df"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gaf4b1a67df5d332e67f2b66fa4e617fe5">_gdsl_bstree_get_left</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the left sub-tree of a low-level binary search tree.  <a href="#gaf4b1a67df5d332e67f2b66fa4e617fe5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga776ab03b21c0c563f14f2a1401eaf570">_gdsl_bstree_get_right</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the right sub-tree of a low-level binary search tree.  <a href="#ga776ab03b21c0c563f14f2a1401eaf570"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga83c4bb599ca019fe55f428862c28ad22">_gdsl_bstree_get_size</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of a low-level binary search tree.  <a href="#ga83c4bb599ca019fe55f428862c28ad22"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gad5d0875a352cd61c834bf8fc5696f5e6">_gdsl_bstree_get_height</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the height of a low-level binary search tree.  <a href="#gad5d0875a352cd61c834bf8fc5696f5e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gab1579e077e48863cf5784661288cb3af">_gdsl_bstree_insert</a> (<a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> *T, const <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a> COMP_F, const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> VALUE, int *RESULT)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert an element into a low-level binary search tree if it's not found or return it.  <a href="#gab1579e077e48863cf5784661288cb3af"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga4cb0fde8726d4e8f2abdc55d2fc9a38d">_gdsl_bstree_remove</a> (<a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> *T, const <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a> COMP_F, const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> VALUE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove an element from a low-level binary search tree.  <a href="#ga4cb0fde8726d4e8f2abdc55d2fc9a38d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gaeee9a8e4bfbca794beab68aa0d67a836">_gdsl_bstree_search</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a> COMP_F, const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> VALUE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Search for a particular element into a low-level binary search tree.  <a href="#gaeee9a8e4bfbca794beab68aa0d67a836"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga487bb4275d4b387054abe2828d24cba8">_gdsl_bstree_search_next</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a> COMP_F, const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> VALUE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Search for the next element of a particular element into a low-level binary search tree, according to the binary search tree order.  <a href="#ga487bb4275d4b387054abe2828d24cba8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga0242fbde8ffdcd1dd67d02858a8e136e">_gdsl_bstree_map_prefix</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group____gdsl__bstree.html#ga2716161e9382a6efb5ea83986ed5a719">_gdsl_bstree_map_func_t</a> MAP_F, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse a low-level binary search tree in prefixed order.  <a href="#ga0242fbde8ffdcd1dd67d02858a8e136e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#ga4218ed4929831254a7c494b8ee2a5720">_gdsl_bstree_map_infix</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group____gdsl__bstree.html#ga2716161e9382a6efb5ea83986ed5a719">_gdsl_bstree_map_func_t</a> MAP_F, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse a low-level binary search tree in infixed order.  <a href="#ga4218ed4929831254a7c494b8ee2a5720"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gaae4fc832c898618e2f354f67f87ddfdd">_gdsl_bstree_map_postfix</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group____gdsl__bstree.html#ga2716161e9382a6efb5ea83986ed5a719">_gdsl_bstree_map_func_t</a> MAP_F, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse a low-level binary search tree in postfixed order.  <a href="#gaae4fc832c898618e2f354f67f87ddfdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gada74089b1dc31ac12ecf36466cb270d6">_gdsl_bstree_write</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group____gdsl__bstree.html#ga770d4d27896b2c17467c243d3485a362">_gdsl_bstree_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the content of all nodes of a low-level binary search tree to a file.  <a href="#gada74089b1dc31ac12ecf36466cb270d6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gaac655f059ca8478b759d432f69bf1d3f">_gdsl_bstree_write_xml</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group____gdsl__bstree.html#ga770d4d27896b2c17467c243d3485a362">_gdsl_bstree_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the content of a low-level binary search tree to a file into XML.  <a href="#gaac655f059ca8478b759d432f69bf1d3f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group____gdsl__bstree.html#gab389b3f4660e64cd0b618c41dd3814b6">_gdsl_bstree_dump</a> (const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> T, const <a class="el" href="group____gdsl__bstree.html#ga770d4d27896b2c17467c243d3485a362">_gdsl_bstree_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dump the internal structure of a low-level binary search tree to a file.  <a href="#gab389b3f4660e64cd0b618c41dd3814b6"></a><br/></td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga0b897530b6c7e499f38de973f8e0889d"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_t" ref="ga0b897530b6c7e499f38de973f8e0889d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="group____gdsl__bintree.html#ga797c557a551a057c0763387ce7b92fbe">_gdsl_bintree_t</a> <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL low-level binary search tree type. </p>
<p>This type is voluntary opaque. Variables of this kind could'nt be directly used, but by the functions of this module. </p>

<p>Definition at line <a class="el" href="__gdsl__bstree_8h_source.html#l00052">52</a> of file <a class="el" href="__gdsl__bstree_8h_source.html">_gdsl_bstree.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2716161e9382a6efb5ea83986ed5a719"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_map_func_t" ref="ga2716161e9382a6efb5ea83986ed5a719" args=")(_gdsl_bstree_t TREE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(*  <a class="el" href="group____gdsl__bstree.html#ga2716161e9382a6efb5ea83986ed5a719">_gdsl_bstree_map_func_t</a>)(<a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> TREE, void *USER_DATA)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL low-level binary search tree map function type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">TREE</td><td>The low-level binary search tree to map. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>The user datas to pass to this function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>GDSL_MAP_STOP if the mapping must be stopped. </dd>
<dd>
GDSL_MAP_CONT if the mapping must be continued. </dd></dl>

<p>Definition at line <a class="el" href="__gdsl__bstree_8h_source.html#l00061">61</a> of file <a class="el" href="__gdsl__bstree_8h_source.html">_gdsl_bstree.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga770d4d27896b2c17467c243d3485a362"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_write_func_t" ref="ga770d4d27896b2c17467c243d3485a362" args=")(_gdsl_bstree_t TREE, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  <a class="el" href="group____gdsl__bstree.html#ga770d4d27896b2c17467c243d3485a362">_gdsl_bstree_write_func_t</a>)(<a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> TREE, FILE *OUTPUT_FILE, void *USER_DATA)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL low-level binary search tree write function type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">TREE</td><td>The low-level binary search tree to write. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write TREE. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>The user datas to pass to this function. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="__gdsl__bstree_8h_source.html#l00071">71</a> of file <a class="el" href="__gdsl__bstree_8h_source.html">_gdsl_bstree.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga10c784a6ed1d430af98b0adba1bebdcf"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_alloc" ref="ga10c784a6ed1d430af98b0adba1bebdcf" args="(const gdsl_element_t E)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#ga10c784a6ed1d430af98b0adba1bebdcf">_gdsl_bstree_alloc</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td>
          <td class="paramname"><em>E</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new low-level binary search tree. </p>
<p>Allocate a new low-level binary search tree data structure. Its root content is sets to E and its left and right sons are set to NULL.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>nothing. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">E</td><td>The root content of the new low-level binary search tree to create. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated low-level binary search tree in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gafd25488c416a9633f4120ad314212333" title="Destroy a low-level binary search tree.">_gdsl_bstree_free()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gafd25488c416a9633f4120ad314212333"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_free" ref="gafd25488c416a9633f4120ad314212333" args="(_gdsl_bstree_t T, const gdsl_free_func_t FREE_F)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group____gdsl__bstree.html#gafd25488c416a9633f4120ad314212333">_gdsl_bstree_free</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053">gdsl_free_func_t</a>&#160;</td>
          <td class="paramname"><em>FREE_F</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroy a low-level binary search tree. </p>
<p>Flush and destroy the low-level binary search tree T. If FREE_F != NULL, FREE_F function is used to deallocate each T's element. Otherwise nothing is done with T's elements.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>nothing. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to destroy. </td></tr>
    <tr><td class="paramname">FREE_F</td><td>The function used to deallocate T's nodes contents. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga10c784a6ed1d430af98b0adba1bebdcf" title="Create a new low-level binary search tree.">_gdsl_bstree_alloc()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga2f94dab341cc2a1c9c2a8239369dae4d"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_copy" ref="ga2f94dab341cc2a1c9c2a8239369dae4d" args="(const _gdsl_bstree_t T, const gdsl_copy_func_t COPY_F)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#ga2f94dab341cc2a1c9c2a8239369dae4d">_gdsl_bstree_copy</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga4f82a1f397e66d35523569063d570175">gdsl_copy_func_t</a>&#160;</td>
          <td class="paramname"><em>COPY_F</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy a low-level binary search tree. </p>
<p>Create and return a copy of the low-level binary search tree T using COPY_F on each T's element to copy them.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>COPY_F != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to copy. </td></tr>
    <tr><td class="paramname">COPY_F</td><td>The function used to copy T's nodes contents. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a copy of T in case of success. </dd>
<dd>
NULL if _gdsl_bstree_is_empty (T) == TRUE or in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga10c784a6ed1d430af98b0adba1bebdcf" title="Create a new low-level binary search tree.">_gdsl_bstree_alloc()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gafd25488c416a9633f4120ad314212333" title="Destroy a low-level binary search tree.">_gdsl_bstree_free()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#ga5955df8215a1223beed9edb24094fd80" title="Check if a low-level binary search tree is empty.">_gdsl_bstree_is_empty()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga5955df8215a1223beed9edb24094fd80"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_is_empty" ref="ga5955df8215a1223beed9edb24094fd80" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#gaf6a258d8f3ee5206d682d799316314b1">bool</a> <a class="el" href="group____gdsl__bstree.html#ga5955df8215a1223beed9edb24094fd80">_gdsl_bstree_is_empty</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if a low-level binary search tree is empty. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>nothing. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the low-level binary search tree T is empty. </dd>
<dd>
FALSE if the low-level binary search tree T is not empty. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga59ae4fa970ad43f4678e58b362628db2" title="Check if a low-level binary search tree is reduced to a leaf.">_gdsl_bstree_is_leaf()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gae62897ba93764533e8df2495453c4fa9" title="Check if a low-level binary search tree is a root.">_gdsl_bstree_is_root()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga59ae4fa970ad43f4678e58b362628db2"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_is_leaf" ref="ga59ae4fa970ad43f4678e58b362628db2" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#gaf6a258d8f3ee5206d682d799316314b1">bool</a> <a class="el" href="group____gdsl__bstree.html#ga59ae4fa970ad43f4678e58b362628db2">_gdsl_bstree_is_leaf</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if a low-level binary search tree is reduced to a leaf. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>T must be a non-empty _gdsl_bstree_t. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the low-level binary search tree T is a leaf. </dd>
<dd>
FALSE if the low-level binary search tree T is not a leaf. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga5955df8215a1223beed9edb24094fd80" title="Check if a low-level binary search tree is empty.">_gdsl_bstree_is_empty()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gae62897ba93764533e8df2495453c4fa9" title="Check if a low-level binary search tree is a root.">_gdsl_bstree_is_root()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaa85b6f4474e138752d7bb1d19d444110"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_get_content" ref="gaa85b6f4474e138752d7bb1d19d444110" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group____gdsl__bstree.html#gaa85b6f4474e138752d7bb1d19d444110">_gdsl_bstree_get_content</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the root content of a low-level binary search tree. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>T must be a non-empty _gdsl_bstree_t. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the root's content of the low-level binary search tree T. </dd></dl>

</div>
</div>
<a class="anchor" id="gae62897ba93764533e8df2495453c4fa9"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_is_root" ref="gae62897ba93764533e8df2495453c4fa9" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#gaf6a258d8f3ee5206d682d799316314b1">bool</a> <a class="el" href="group____gdsl__bstree.html#gae62897ba93764533e8df2495453c4fa9">_gdsl_bstree_is_root</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if a low-level binary search tree is a root. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>T must be a non-empty _gdsl_bstree_t. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the low-level binary search tree T is a root. </dd>
<dd>
FALSE if the low-level binary search tree T is not a root. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga5955df8215a1223beed9edb24094fd80" title="Check if a low-level binary search tree is empty.">_gdsl_bstree_is_empty()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#ga59ae4fa970ad43f4678e58b362628db2" title="Check if a low-level binary search tree is reduced to a leaf.">_gdsl_bstree_is_leaf()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga786c44e574347710f4d527a2b19cf0df"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_get_parent" ref="ga786c44e574347710f4d527a2b19cf0df" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#ga786c44e574347710f4d527a2b19cf0df">_gdsl_bstree_get_parent</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the parent tree of a low-level binary search tree. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>T must be a non-empty _gdsl_bstree_t. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the parent of the low-level binary search tree T if T isn't a root. </dd>
<dd>
NULL if the low-level binary search tree T is a root (ie. T has no parent). </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gae62897ba93764533e8df2495453c4fa9" title="Check if a low-level binary search tree is a root.">_gdsl_bstree_is_root()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaf4b1a67df5d332e67f2b66fa4e617fe5"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_get_left" ref="gaf4b1a67df5d332e67f2b66fa4e617fe5" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#gaf4b1a67df5d332e67f2b66fa4e617fe5">_gdsl_bstree_get_left</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the left sub-tree of a low-level binary search tree. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>T must be a non-empty _gdsl_bstree_t. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the left sub-tree of the low-level binary search tree T if T has a left sub-tree. </dd>
<dd>
NULL if the low-level binary search tree T has no left sub-tree. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga776ab03b21c0c563f14f2a1401eaf570" title="Get the right sub-tree of a low-level binary search tree.">_gdsl_bstree_get_right()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga776ab03b21c0c563f14f2a1401eaf570"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_get_right" ref="ga776ab03b21c0c563f14f2a1401eaf570" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#ga776ab03b21c0c563f14f2a1401eaf570">_gdsl_bstree_get_right</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the right sub-tree of a low-level binary search tree. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>T must be a non-empty _gdsl_bstree_t. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the right sub-tree of the low-level binary search tree T if T has a right sub-tree. </dd>
<dd>
NULL if the low-level binary search tree T has no right sub-tree. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gaf4b1a67df5d332e67f2b66fa4e617fe5" title="Get the left sub-tree of a low-level binary search tree.">_gdsl_bstree_get_left()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga83c4bb599ca019fe55f428862c28ad22"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_get_size" ref="ga83c4bb599ca019fe55f428862c28ad22" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group____gdsl__bstree.html#ga83c4bb599ca019fe55f428862c28ad22">_gdsl_bstree_get_size</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the size of a low-level binary search tree. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>nothing. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to compute the size from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of elements of T (noted |T|). </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gad5d0875a352cd61c834bf8fc5696f5e6" title="Get the height of a low-level binary search tree.">_gdsl_bstree_get_height()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gad5d0875a352cd61c834bf8fc5696f5e6"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_get_height" ref="gad5d0875a352cd61c834bf8fc5696f5e6" args="(const _gdsl_bstree_t T)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group____gdsl__bstree.html#gad5d0875a352cd61c834bf8fc5696f5e6">_gdsl_bstree_get_height</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the height of a low-level binary search tree. </p>
<p>Compute the height of the low-level binary search tree T (noted h(T)).</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>nothing. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to compute the height from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the height of T. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga83c4bb599ca019fe55f428862c28ad22" title="Get the size of a low-level binary search tree.">_gdsl_bstree_get_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gab1579e077e48863cf5784661288cb3af"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_insert" ref="gab1579e077e48863cf5784661288cb3af" args="(_gdsl_bstree_t *T, const gdsl_compare_func_t COMP_F, const gdsl_element_t VALUE, int *RESULT)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#gab1579e077e48863cf5784661288cb3af">_gdsl_bstree_insert</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> *&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a>&#160;</td>
          <td class="paramname"><em>COMP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td>
          <td class="paramname"><em>VALUE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>RESULT</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Insert an element into a low-level binary search tree if it's not found or return it. </p>
<p>Search for the first element E equal to VALUE into the low-level binary search tree T, by using COMP_F function to find it. If an element E equal to VALUE is found, then it's returned. If no element equal to VALUE is found, then E is inserted and its root returned.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( h(T) ), where log2(|T|) &lt;= h(T) &lt;= |T|-1 </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>COMP_F != NULL &amp; RESULT != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The reference of the low-level binary search tree to use. </td></tr>
    <tr><td class="paramname">COMP_F</td><td>The comparison function to use to compare T's elements with VALUE to find E. </td></tr>
    <tr><td class="paramname">VALUE</td><td>The value used to search for the element E. </td></tr>
    <tr><td class="paramname">RESULT</td><td>The address where the result code will be stored. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the root containing E and RESULT = GDSL_INSERTED if E is inserted. </dd>
<dd>
the root containing E and RESULT = GDSL_ERR_DUPLICATE_ENTRY if E is not inserted. </dd>
<dd>
NULL and RESULT = GDSL_ERR_MEM_ALLOC in case of failure. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gaeee9a8e4bfbca794beab68aa0d67a836" title="Search for a particular element into a low-level binary search tree.">_gdsl_bstree_search()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#ga4cb0fde8726d4e8f2abdc55d2fc9a38d" title="Remove an element from a low-level binary search tree.">_gdsl_bstree_remove()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga4cb0fde8726d4e8f2abdc55d2fc9a38d"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_remove" ref="ga4cb0fde8726d4e8f2abdc55d2fc9a38d" args="(_gdsl_bstree_t *T, const gdsl_compare_func_t COMP_F, const gdsl_element_t VALUE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group____gdsl__bstree.html#ga4cb0fde8726d4e8f2abdc55d2fc9a38d">_gdsl_bstree_remove</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> *&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a>&#160;</td>
          <td class="paramname"><em>COMP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td>
          <td class="paramname"><em>VALUE</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove an element from a low-level binary search tree. </p>
<p>Remove from the low-level binary search tree T the first founded element E equal to VALUE, by using COMP_F function to compare T's elements. If E is found, it is removed from T.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( h(T) ), where log2(|T|) &lt;= h(T) &lt;= |T|-1 </dd>
<dd>
The resulting T is modified by examinating the left sub-tree from the founded e. </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>COMP_F != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The reference of the low-level binary search tree to modify. </td></tr>
    <tr><td class="paramname">COMP_F</td><td>The comparison function to use to compare T's elements with VALUE to find the element e to remove. </td></tr>
    <tr><td class="paramname">VALUE</td><td>The value that must be used by COMP_F to find the element e to remove. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the fisrt founded element equal to VALUE in T. </dd>
<dd>
NULL if no element equal to VALUE is found or if T is empty. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gab1579e077e48863cf5784661288cb3af" title="Insert an element into a low-level binary search tree if it&#39;s not found or return it...">_gdsl_bstree_insert()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gaeee9a8e4bfbca794beab68aa0d67a836" title="Search for a particular element into a low-level binary search tree.">_gdsl_bstree_search()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaeee9a8e4bfbca794beab68aa0d67a836"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_search" ref="gaeee9a8e4bfbca794beab68aa0d67a836" args="(const _gdsl_bstree_t T, const gdsl_compare_func_t COMP_F, const gdsl_element_t VALUE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#gaeee9a8e4bfbca794beab68aa0d67a836">_gdsl_bstree_search</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a>&#160;</td>
          <td class="paramname"><em>COMP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td>
          <td class="paramname"><em>VALUE</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Search for a particular element into a low-level binary search tree. </p>
<p>Search the first element E equal to VALUE in the low-level binary search tree T, by using COMP_F function to find it.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( h(T) ), where log2(|T|) &lt;= h(T) &lt;= |T|-1 </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>COMP_F != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to use. </td></tr>
    <tr><td class="paramname">COMP_F</td><td>The comparison function to use to compare T's elements with VALUE to find the element E. </td></tr>
    <tr><td class="paramname">VALUE</td><td>The value that must be used by COMP_F to find the element E. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the root of the tree containing E if it's found. </dd>
<dd>
NULL if VALUE is not found in T. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gab1579e077e48863cf5784661288cb3af" title="Insert an element into a low-level binary search tree if it&#39;s not found or return it...">_gdsl_bstree_insert()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#ga4cb0fde8726d4e8f2abdc55d2fc9a38d" title="Remove an element from a low-level binary search tree.">_gdsl_bstree_remove()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga487bb4275d4b387054abe2828d24cba8"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_search_next" ref="ga487bb4275d4b387054abe2828d24cba8" args="(const _gdsl_bstree_t T, const gdsl_compare_func_t COMP_F, const gdsl_element_t VALUE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#ga487bb4275d4b387054abe2828d24cba8">_gdsl_bstree_search_next</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7">gdsl_compare_func_t</a>&#160;</td>
          <td class="paramname"><em>COMP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td>
          <td class="paramname"><em>VALUE</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Search for the next element of a particular element into a low-level binary search tree, according to the binary search tree order. </p>
<p>Search for an element E in the low-level binary search tree T, by using COMP_F function to find the first element E equal to VALUE.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( h(T) ), where log2(|T|) &lt;= h(T) &lt;= |T|-1 </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>COMP_F != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to use. </td></tr>
    <tr><td class="paramname">COMP_F</td><td>The comparison function to use to compare T's elements with VALUE to find the element E. </td></tr>
    <tr><td class="paramname">VALUE</td><td>The value that must be used by COMP_F to find the element E. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the root of the tree containing the successor of E if it's found. </dd>
<dd>
NULL if VALUE is not found in T or if E has no sucessor. </dd></dl>

</div>
</div>
<a class="anchor" id="ga0242fbde8ffdcd1dd67d02858a8e136e"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_map_prefix" ref="ga0242fbde8ffdcd1dd67d02858a8e136e" args="(const _gdsl_bstree_t T, const _gdsl_bstree_map_func_t MAP_F, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#ga0242fbde8ffdcd1dd67d02858a8e136e">_gdsl_bstree_map_prefix</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga2716161e9382a6efb5ea83986ed5a719">_gdsl_bstree_map_func_t</a>&#160;</td>
          <td class="paramname"><em>MAP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a low-level binary search tree in prefixed order. </p>
<p>Parse all nodes of the low-level binary search tree T in prefixed order. The MAP_F function is called on each node with the USER_DATA argument. If MAP_F returns GDSL_MAP_STOP, then <a class="el" href="group____gdsl__bstree.html#ga0242fbde8ffdcd1dd67d02858a8e136e" title="Parse a low-level binary search tree in prefixed order.">_gdsl_bstree_map_prefix()</a> stops and returns its last examinated node.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>MAP_F != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to map. </td></tr>
    <tr><td class="paramname">MAP_F</td><td>The map function. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to MAP_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first node for which MAP_F returns GDSL_MAP_STOP. </dd>
<dd>
NULL when the parsing is done. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga4218ed4929831254a7c494b8ee2a5720" title="Parse a low-level binary search tree in infixed order.">_gdsl_bstree_map_infix()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gaae4fc832c898618e2f354f67f87ddfdd" title="Parse a low-level binary search tree in postfixed order.">_gdsl_bstree_map_postfix()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga4218ed4929831254a7c494b8ee2a5720"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_map_infix" ref="ga4218ed4929831254a7c494b8ee2a5720" args="(const _gdsl_bstree_t T, const _gdsl_bstree_map_func_t MAP_F, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#ga4218ed4929831254a7c494b8ee2a5720">_gdsl_bstree_map_infix</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga2716161e9382a6efb5ea83986ed5a719">_gdsl_bstree_map_func_t</a>&#160;</td>
          <td class="paramname"><em>MAP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a low-level binary search tree in infixed order. </p>
<p>Parse all nodes of the low-level binary search tree T in infixed order. The MAP_F function is called on each node with the USER_DATA argument. If MAP_F returns GDSL_MAP_STOP, then <a class="el" href="group____gdsl__bstree.html#ga4218ed4929831254a7c494b8ee2a5720" title="Parse a low-level binary search tree in infixed order.">_gdsl_bstree_map_infix()</a> stops and returns its last examinated node.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>MAP_F != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to map. </td></tr>
    <tr><td class="paramname">MAP_F</td><td>The map function. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to MAP_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first node for which MAP_F returns GDSL_MAP_STOP. </dd>
<dd>
NULL when the parsing is done. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga0242fbde8ffdcd1dd67d02858a8e136e" title="Parse a low-level binary search tree in prefixed order.">_gdsl_bstree_map_prefix()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gaae4fc832c898618e2f354f67f87ddfdd" title="Parse a low-level binary search tree in postfixed order.">_gdsl_bstree_map_postfix()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaae4fc832c898618e2f354f67f87ddfdd"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_map_postfix" ref="gaae4fc832c898618e2f354f67f87ddfdd" args="(const _gdsl_bstree_t T, const _gdsl_bstree_map_func_t MAP_F, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a> <a class="el" href="group____gdsl__bstree.html#gaae4fc832c898618e2f354f67f87ddfdd">_gdsl_bstree_map_postfix</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga2716161e9382a6efb5ea83986ed5a719">_gdsl_bstree_map_func_t</a>&#160;</td>
          <td class="paramname"><em>MAP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a low-level binary search tree in postfixed order. </p>
<p>Parse all nodes of the low-level binary search tree T in postfixed order. The MAP_F function is called on each node with the USER_DATA argument. If MAP_F returns GDSL_MAP_STOP, then <a class="el" href="group____gdsl__bstree.html#gaae4fc832c898618e2f354f67f87ddfdd" title="Parse a low-level binary search tree in postfixed order.">_gdsl_bstree_map_postfix()</a> stops and returns its last examinated node.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>MAP_F != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to map. </td></tr>
    <tr><td class="paramname">MAP_F</td><td>The map function. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to MAP_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first node for which MAP_F returns GDSL_MAP_STOP. </dd>
<dd>
NULL when the parsing is done. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#ga0242fbde8ffdcd1dd67d02858a8e136e" title="Parse a low-level binary search tree in prefixed order.">_gdsl_bstree_map_prefix()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#ga4218ed4929831254a7c494b8ee2a5720" title="Parse a low-level binary search tree in infixed order.">_gdsl_bstree_map_infix()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gada74089b1dc31ac12ecf36466cb270d6"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_write" ref="gada74089b1dc31ac12ecf36466cb270d6" args="(const _gdsl_bstree_t T, const _gdsl_bstree_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group____gdsl__bstree.html#gada74089b1dc31ac12ecf36466cb270d6">_gdsl_bstree_write</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga770d4d27896b2c17467c243d3485a362">_gdsl_bstree_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the content of all nodes of a low-level binary search tree to a file. </p>
<p>Write the nodes contents of the low-level binary search tree T to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>WRITE_F != NULL&amp; OUTPUT_FILE != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to write. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write T's nodes. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gaac655f059ca8478b759d432f69bf1d3f" title="Write the content of a low-level binary search tree to a file into XML.">_gdsl_bstree_write_xml()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gab389b3f4660e64cd0b618c41dd3814b6" title="Dump the internal structure of a low-level binary search tree to a file.">_gdsl_bstree_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaac655f059ca8478b759d432f69bf1d3f"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_write_xml" ref="gaac655f059ca8478b759d432f69bf1d3f" args="(const _gdsl_bstree_t T, const _gdsl_bstree_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group____gdsl__bstree.html#gaac655f059ca8478b759d432f69bf1d3f">_gdsl_bstree_write_xml</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga770d4d27896b2c17467c243d3485a362">_gdsl_bstree_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the content of a low-level binary search tree to a file into XML. </p>
<p>Write the nodes contents of the low-level binary search tree T to OUTPUT_FILE, into XML language. If WRITE_F != NULL, then use WRITE_F function to write T's nodes contents to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>OUTPUT_FILE != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to write. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write T's nodes. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gada74089b1dc31ac12ecf36466cb270d6" title="Write the content of all nodes of a low-level binary search tree to a file.">_gdsl_bstree_write()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gab389b3f4660e64cd0b618c41dd3814b6" title="Dump the internal structure of a low-level binary search tree to a file.">_gdsl_bstree_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gab389b3f4660e64cd0b618c41dd3814b6"></a><!-- doxytag: member="_gdsl_bstree.h::_gdsl_bstree_dump" ref="gab389b3f4660e64cd0b618c41dd3814b6" args="(const _gdsl_bstree_t T, const _gdsl_bstree_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group____gdsl__bstree.html#gab389b3f4660e64cd0b618c41dd3814b6">_gdsl_bstree_dump</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga0b897530b6c7e499f38de973f8e0889d">_gdsl_bstree_t</a>&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group____gdsl__bstree.html#ga770d4d27896b2c17467c243d3485a362">_gdsl_bstree_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dump the internal structure of a low-level binary search tree to a file. </p>
<p>Dump the structure of the low-level binary search tree T to OUTPUT_FILE. If WRITE_F != NULL, then use WRITE_F function to write T's nodes content to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |T| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>OUTPUT_FILE != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">T</td><td>The low-level binary search tree to dump. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write T's nodes. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group____gdsl__bstree.html#gada74089b1dc31ac12ecf36466cb270d6" title="Write the content of all nodes of a low-level binary search tree to a file.">_gdsl_bstree_write()</a> </dd>
<dd>
<a class="el" href="group____gdsl__bstree.html#gaac655f059ca8478b759d432f69bf1d3f" title="Write the content of a low-level binary search tree to a file into XML.">_gdsl_bstree_write_xml()</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>

    <li class="footer">Generated on Wed Jun 12 2013 18:18:47 for gdsl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
